<?php

namespace App\Rules;

class DictDataValidate extends BaseValidate
{
    //验证规则
    protected $rule = [
        'dict_name' => 'required',
        'dict_type' => 'required',
        'dict_value' => 'required',
        'dict_label' => 'required',
    ];
    //自定义验证信息
    protected $message = [
        'dict_name.required' => '数据名称不能为空',
        'dict_type.required' => '数据类型不能为空',
        'dict_value.required' => '数据键值不能为空',
        'dict_label.required' => '数据标签不能为空',
    ];

    //自定义场景
    protected $scene = [
//        'add' => "title,content",
//        'edit' => ['anchor_id', 'anchor_type_id'],
    ];
}
